// 分治算法二分法查找
function binarySearchSplit(arr, value, compareFn = defaultCompare) {
  const low = 0;
  const high = arr.length - 1;
  return
}
// 内部搜索
function innerSearch(arr, value, low, high, compareFn) {
  if (low <= high) {
    // 中间值下标
    const mid = Math.floor((low + high) / 2);
    const element = arr[mid];
    // 如果value小于中间值
    if (compareFn(value, element) === -1) {
      high = mid - 1;
      return innerSearch(arr, value, low, high, compareFn);
    } else if (compareFn(value, element) === 1) {
      low = mid + 1;
      return innerSearch(arr, value, low, high, compareFn);
    } else {
      return min;
    }
  }
  return -1;
}

function defaultCompare(a, b) {
  if (a === b) return 0;
  return a > b ? 1 : -1;
}